package whu.cn.whushare.ui.main.known.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

import java.util.List;

public class Answer implements Parcelable {
	@Expose
	@SerializedName("answerId")
	public String id;
	@Expose
	@SerializedName("userId")
	public String uid;
	@Expose
	public String question;
	@Expose
	public String answerContext;
	@Expose
	public String createTime;
	@Expose
	public int voteCount;
	@Expose
	public int commentNum;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getQuestion() {
		return question;
	}

	public void setQuestion(String question) {
		this.question = question;
	}

	public String getAnswerContext() {
		return answerContext;
	}

	public void setAnswerContext(String answerContext) {
		this.answerContext = answerContext;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public int getVoteCount() {
		return voteCount;
	}

	public void setVoteCount(int voteCount) {
		this.voteCount = voteCount;
	}

	public int getCommentNum() {
		return commentNum;
	}

	public void setCommentNum(int commentNum) {
		this.commentNum = commentNum;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(id);
		dest.writeString(uid);
		dest.writeString(question);
		dest.writeString(answerContext);
		dest.writeString(createTime);
		dest.writeInt(voteCount);
		dest.writeInt(commentNum);
	}

	public static final Parcelable.Creator<Answer> CREATOR = new Parcelable.Creator<Answer>() {
		@Override
		public Answer createFromParcel(Parcel source) {
			Answer answer = new Answer();
			answer.id = source.readString();
			answer.uid = source.readString();
			answer.question = source.readString();
			answer.answerContext = source.readString();
			answer.createTime = source.readString();
			answer.voteCount = source.readInt();
			answer.commentNum = source.readInt();

			return answer;
		}

		@Override
		public Answer[] newArray(int size) {
			return new Answer[0];
		}
	};
}
